<ul>
	<?php foreach($menu as $key => $item):?>
		
			<?php
			$class = "";
			if(empty($item['Node']['shortcut'])) {
				$url = array('plugin'=>'nodes', 'controller'=>'nodes', $item['Node']['path']);
			} else {
				$url = $item['Node']['shortcut'];
			}
			$render_url = $html->url($url);
			$this_here = $this->here;
			if(substr($this_here, -1) == "/") {
				$this_here = substr($this_here, 0, -1);
			}
			
			$here =  substr($this_here , 0, strlen($render_url) );
			//$base
			if($render_url == $here and $key > 0) {
				$class = "active";
				
			}
			if(isset($active['Node']['id']) and $item['Node']['id'] == $active['Node']['id']) {
					$class = "active";
				
			}
			//if($key)
			if($this_here == $this->base and $key == 0) {
				$class = "active";
			}
			$tag = $html->tag('span', $item['Node']['title']);
			?>
		<li class="<?php echo $class ?>">
			<?php echo $html->link($tag, $url, array('class'=>$class), null, false); ?>
		</li>
	<?php endforeach; ?>
</ul>